package com.butterfly.demo.serviceImpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;

import com.butterfly.demo.dao.StudentDao;
import com.butterfly.demo.model.Student;
import com.butterfly.demo.service.StudentService;
@Component
public class StudentServiceImpl implements StudentService{
	private StudentDao studentDao;
	public void add(Student student) {
		studentDao.save(student);
	}
	@Resource
	public void setStudentDao(StudentDao studentDao) {
		this.studentDao = studentDao;
	}
	public StudentDao getStudentDao() {
		return studentDao;
	}
	public Student login(Student student) {
		return studentDao.checkUser(student);
	}
	
}
